package mianxiangduixiang.ClassExam;

import java.io.*;
import java.util.*;

/**
 * @Author JetZhang
 * @Date 2021/11/1
 */
public class TestFile {

    public static void main(String[] args) {
        File input = new File("Demo.txt");
        File output = new File("Test.txt");
        try {
            Scanner scanner = new Scanner(input);
            PrintWriter printWriter = new PrintWriter(output);
            while (scanner.hasNextLine()) {
                String s = scanner.nextLine();
                printWriter.write(s);
            }
            System.out.println("Success");
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

    }
}
